package flychess.rules.impl;

import flychess.entity.Player;
import flychess.rules.GameRule;

public class NormalRule implements GameRule {
    @Override
    public int handleRule(Player player, Player rival, int position) {
        if (position == rival.getPlayerPos()) { // 与对手相遇，将其踢回起点
            rival.setPlayerPos(0);
            System.out.println("-D: 哈哈哈，踩到你了！");
        }
        return position;
    }
}
